package com.design.pattern.builder;

public class ManBuilder implements PersonBuilder{
    private Person person;
    public ManBuilder() {
        //创建一个Person实例,用于调用set方法
        person = new Person();
    }

    @Override
    public Person BuilderPersion() {
        return person;
    }

    @Override
    public PersonBuilder builderHead() {
        person.setHead("建造者头部分");
        return this;
    }

    @Override
    public PersonBuilder builderBody() {
        person.setBody("建造者身体部分");
        return this;
    }

    @Override
    public PersonBuilder builderFoot() {
        person.setFoot("建造者头四肢部分");
        return this;
    }


}
